﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UniPie
{
	/// <summary>
	/// Defines the screen area where the related behavior could be activated.
	/// </summary>
	public class ScreenArea
	{
		/// <summary>
		/// Defines the index of a windows desktop. -1 means any.
		/// </summary>
		public int DesktopIndex { get; set; }

		/// <summary>
		/// Defines 9 areas on the screen: 4 corners, 4 edges and the center.
		/// </summary>
		public bool[] Area { get; set; }

		/// <summary>
		/// Specifies the width of the 4 corners and edges around the center.
		/// </summary>
		public int EdgeWidth { get; set; }

		public ScreenArea()
		{
			DesktopIndex = -1;
			Area = new bool[9] {true, true, true,
								true, true, true,
								true, true, true};
			EdgeWidth = 16;
		}

		/// <summary>
		/// Deep copy constructor.
		/// </summary>
		public ScreenArea(ScreenArea sa)
		{
			DesktopIndex = sa.DesktopIndex;
			Area = (bool[])sa.Area.Clone();
			EdgeWidth = sa.EdgeWidth;
		}

		public ScreenArea(int TheDesktopIndex, bool[] TheArea, int TheEdgeWidth)
		{
			DesktopIndex = TheDesktopIndex;
			Area = TheArea;
			EdgeWidth = TheEdgeWidth;
		}
	}
}
